#coding: utf8
#Programa: aniversary.py
#Autor: Iván Viguera
#Fecha: 11/11/2010
#Descripción:
import time
from datetime import date

def main():
    try:
        today = date.today()
        my_birthday = date(today.year,int(raw_input("Mes [mm]: ")),int(raw_input("Día [dd]: ")))
        if my_birthday == today:
            print "Avui es el teu aniversari. Felicitats!"
        elif my_birthday < today:
            difD = abs(today - my_birthday)
            aux = ""
            if difD.days == 1:
                aux = "Ahir"
            elif difD.days == 2:
                aux = "Abans d'ahir"
            else:
                return 0
            print aux, "va ser el teu aniversari."
        else:
            print "Encara falten ", abs(my_birthday - today).days, "dies pel teu pròxim aniversari. Paciència"
    except Exception, e:
        print e
main()
